package com.tttt.aop.proxyproblem;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class ProxyProblemAspect {

    @Around(value = "within(com.tttt.aop.proxyproblem..*)" +
            " && execution(public * *(..))")
    public void aroundAdvice(ProceedingJoinPoint pjp) throws Throwable {
        Signature signature = pjp.getSignature();
        System.out.printf("advice for InnerInvokeService.%s() executed....\n", signature.getName());
        pjp.proceed();
    }
}
